package org.flik.client.main.service;

import org.flik.server.dto.InitialData;
import org.flik.server.dto.TicketChange;
import org.flik.server.dto.TicketDetail;
import org.flik.server.dto.ProjectData;
import org.flik.server.dto.TiketSearchResult;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.AsyncCallback;

public interface UserServiceAsync {
	UserServiceAsync INSTANCE = GWT.create(UserService.class);
	void fetchLoggedInUserInfo(AsyncCallback<InitialData> callback);
	void fetchTicketSearchResult(Long projectId, int firstResult, int resultLimit, AsyncCallback<TiketSearchResult> callback);
	void fetchTicketDetails(Long ticketId, AsyncCallback<TicketDetail> callback);
	void save(TicketChange ticketChange, AsyncCallback<Void> callback);
	void create(TicketChange ticketChange, Long projectId,
			AsyncCallback<Long> callback);
	void fetchProjectData(Long projectId, AsyncCallback<ProjectData> callback);
}
